<?php
class Album extends AppModel {
	var $name = 'Album';

	/*
	App::import('Model', 'Company');
	$this->Company = new Company();
	*/

	function latest($limit = 5) {
		$data = $this->find('all',array('order'=>'Album.id ASC','limit'=>$limit));
		return $data;
	}

	function addHits($id) {
		$this->id = $id;
		$hits = $this->read('hits');
		$hits_ctr = $hits['Album']['hits'] + 1;
		$this->saveField('hits',$hits_ctr);
		return;
	}

}
?>